package cn.shyouchi.wuguanjia.android.ui.reportstatistic;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import cn.shyouchi.wuguanjia.android.R;
import cn.shyouchi.wuguanjia.android.base.BaseActivity;
import cn.shyouchi.wuguanjia.android.widget.TopBar;

public class ReportDayStatisticDetailActivity extends BaseActivity {

    @BindView(R.id.topBar)
    TopBar mTopBar;
    @BindView(R.id.rv_report_detail)
    RecyclerView mRvReportDetail;

    ReportDayStatisticDetailAdapter mReportDayStatisticDetailAdapter;

    List<ReportDayStatisticEntity.InfoBean> mInfoBeanList = new ArrayList<>();


    ReportDayStatisticEntity mEntity;

    @Override
    public int initContentView() {
        return R.layout.activity_report_day_statistic_detail;
    }

    @Override
    public void initInjector() {
        mEntity = getIntent().getParcelableExtra("info");
        mInfoBeanList = mEntity.getInfo();

    }

    @Override
    public void initUiAndListener() {
        ButterKnife.bind(this);
        mTopBar.setTitle(getTitle().toString());
        mTopBar.setLeftIcon(R.mipmap.ic_back);
        setSupportActionBar(mTopBar.getToolbar());

        mReportDayStatisticDetailAdapter = new ReportDayStatisticDetailAdapter(mInfoBeanList);

        mRvReportDetail.setAdapter(mReportDayStatisticDetailAdapter);
        mRvReportDetail.setLayoutManager(new LinearLayoutManager(mContext));

    }

    @Override
    protected boolean isApplyStatusBarTranslucency() {
        return false;
    }

    @Override
    protected boolean isApplyStatusBarColor() {
        return true;
    }
}
